package com.jk.mindskip.interfaces;

import com.jk.mindskip.dto.TbAdmin;
import com.jk.mindskip.pojo.PagedResponse;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface TbAdminServiceApi {

    /**
     * @description:查询用户信息
     * @author: wsy
     * @date: 2024/12/10 上午10:27
     * @param: [admin, pageNum, pageSize]
     * @return: com.jk.mindskip.pojo.PagedResponse<com.jk.mindskip.dto.TbAdmin>
     **/
    @PostMapping(value = "/admin/findAdminList")
    PagedResponse<TbAdmin> findAdminList(@RequestBody TbAdmin admin, @RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize);

    /**
     * @description:用户新增
     * @author: wsy
     * @date: 2024/12/10 上午10:27
     * @param: [admin]
     * @return: void
     **/
    @PostMapping(value = "/admin/addAdmin")
    void addAdmin(@RequestBody TbAdmin admin);

    @GetMapping(value = "/admin/findTbAdminByUserName")
    TbAdmin findTbAdminByUserName(@RequestParam(value = "username") String username);

    @GetMapping(value = "/admin/selectPermsByUserId")
    List<String> selectPermsByUserId(@RequestParam(value = "id") Integer id);
}
